import request from '@/router/axios';
import {baseUrl} from '@/config/env';

export const list = (data) => {
    return request({
            url: baseUrl + '/tpp/thirdPartyPlatformFans/page',
            method: 'get',
            data: data
        }
    )
}
export const add = (data) => {
    return request({
            url: baseUrl + '/tpp/thirdPartyPlatformFans/add',
            method: 'post',
            data: data
        }
    )
}

export const updateById = (id, data, index) => {
    return request({
            url: baseUrl + '/tpp/thirdPartyPlatformFans/updateById',
            method: 'put',
            data: data
        }
    )
}
export const deleteById = (id) => {
    return request({
            url: baseUrl + '/tpp/thirdPartyPlatformFans/deleteById/' + id,
            method: 'delete',
        }
    )
}
export const downloadTemplate = () => {
    return request({
            url: baseUrl + '/tpp/thirdPartyPlatformFans/downloadTemplate',
            method: 'get',
            responseType: 'blob'
        }
    )
}
export const exportExcel = (data) => {
    return request({
            url: baseUrl + '/tpp/thirdPartyPlatformFans/exportFile',
            method: 'get',
            responseType: 'blob',
            data: data
        }
    )
}